package com.ximcontroller.views;
import processing.core.PShape;
import processing.core.PApplet;

public class XIMTile {

	PApplet p;
	PShape imgTiles;
	PShape tile;
	int numTile;

	int colorTile;

	public XIMTile(PApplet p, PShape imgTiles, int numTile) {
		this.p = p;
		this.imgTiles = imgTiles;
		this.numTile = numTile;

		//p.println(numTile);

		tile = imgTiles.getChild("" + numTile);
		tile.disableStyle();

		initialize();
	}

	public void initialize() {
		colorTile = p.color(100, 100, 100);

	}

	public void calculate() {

	}

	public void render() {
		tile.disableStyle();
		//p.println(colorTile);

		p.fill(colorTile);
		p.shape(tile);

	}

	public void setColor(int colorTile) {
		this.colorTile = colorTile;

	}

}
